import React, { useState, useEffect } from "react";
import { connect } from 'umi';
import Select from '@/components/FormCondition/Select';
import {  } from '@/common/contact'
import { InputNumber, Radio, Row, Col, Space, Button, Spin, Form } from 'antd';
const ExamYearCondition = (props) => {
  const { data, onChange, stageList = [] } = props
  const { stages = '', amount = '1', conditionType = 'all' } = data
  useEffect(() => {
  }, [])
  const selectList = [
    { name: '毕业年份条件', value: 'examYears', disabled: true },
    { name: '标签权限', value: 'tagIds', disabled: true },
    { name: '商品权限', value: 'goodsIds', disabled: true },
    { name: '阶段权限', value: 'stages', disabled: true },
    { name: '意向方向条件', value: ' intentionDirectionIds', disabled: true }
  ]

  return <Row>
    <Col span={4}>
      <Select
        disabled={true}
        value={'stages'}
        placeholder="请选择类型"
        select={selectList}
      ></Select>
    </Col>
    <Col span={4}>
      <Select
        disabled={true}
        value={conditionType}
        select={[
          { name: '全部', value: 'all' },
          { name: '任意', value: 'any' },
        ]}
      ></Select>
    </Col>
    <Col span={4}>
      <InputNumber
        disabled={true}
        style={{ width: '100%' }}
        value={amount}
        placeholder="请输入数量"
      ></InputNumber>
    </Col>
    <Col span={12}>
      <Select
        mode='multiple'
        placeholder="请选择阶段"
        fieldNames={{
          label: 'stageName',
          value: 'stageIdentification',
        }}
        select={stageList}
        onChange={(e) => {
          console.log(e)
          onChange({ stages: e.toString() })
        }}
        value={stages.split(',').filter(item => { return item })}
      ></Select>
    </Col>
  </Row>
}
export default connect(({ loading }) => ({
  loading: loading.effects['liveStreaming/fetchLiveData']
}))(ExamYearCondition);;
